<template>
  <div class="">
    <hr />
    全选：<input
      type="checkbox"
      v-model="$store.state.checked"
      @change="changeall"
    />
    <span
      >已选择：{{ $store.state.sel.length }}/全部：{{
        $store.state.list.length
      }}</span
    >

    <button v-if="$store.state.sel.length != 0" @click="removeall">
      删除选中
    </button>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  mounted() {},
  methods: {
    changeall() {
      this.$store.commit("changeall");
    },
    removeall() {
      this.$store.commit("removeall");
    },
  },
  components: {},
};
</script>

<style lang="scss"></style>
